package o;

import android.os.Process;
import android.util.Log;
import java.text.SimpleDateFormat;
import java.util.Locale;

public class cma {
    private int ʻ = 0;
    private String ʼ;
    private int ʽ;
    private int ˊ = 0;
    private long ˋ = 0;
    private long ˎ = 0;
    private String ˏ = "";
    private String ॱ = null;
    private final StringBuilder ॱॱ = new StringBuilder();
    private int ᐝ;

    public cma(int i, String str, int i2, String str2) {
        this.ʻ = i;
        this.ॱ = str;
        this.ˊ = i2;
        if (str2 != null) {
            this.ˏ = str2;
        }
        ˏ();
    }

    private cma ˏ() {
        this.ˎ = System.currentTimeMillis();
        Thread currentThread = Thread.currentThread();
        this.ˋ = currentThread.getId();
        this.ᐝ = Process.myPid();
        StackTraceElement[] stackTrace = currentThread.getStackTrace();
        if (stackTrace.length > this.ʻ) {
            StackTraceElement stackTraceElement = stackTrace[this.ʻ];
            this.ʼ = stackTraceElement.getFileName();
            this.ʽ = stackTraceElement.getLineNumber();
        }
        return this;
    }

    public <T> cma ˏ(T t) {
        this.ॱॱ.append(t);
        return this;
    }

    public cma ˊ(Throwable th) {
        if (th != null) {
            ˏ(Character.valueOf('\n')).ˏ(Log.getStackTraceString(th));
        }
        return this;
    }

    public String ˊ() {
        StringBuilder stringBuilder = new StringBuilder();
        ˏ(stringBuilder);
        return stringBuilder.toString();
    }

    private StringBuilder ˏ(StringBuilder stringBuilder) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.getDefault());
        stringBuilder.append('[');
        stringBuilder.append(simpleDateFormat.format(Long.valueOf(this.ˎ)));
        stringBuilder.append(' ').append(clu.ˎ(this.ˊ)).append('/').append(this.ॱ).append('/').append(this.ˏ);
        stringBuilder.append(' ').append(this.ᐝ).append(':').append(this.ˋ);
        stringBuilder.append(' ').append(this.ʼ).append(':').append(this.ʽ);
        stringBuilder.append(']');
        return stringBuilder;
    }

    public String ॱ() {
        StringBuilder stringBuilder = new StringBuilder();
        ˋ(stringBuilder);
        return stringBuilder.toString();
    }

    private StringBuilder ˋ(StringBuilder stringBuilder) {
        stringBuilder.append(' ').append(this.ॱॱ.toString());
        return stringBuilder;
    }

    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        ˏ(stringBuilder);
        ˋ(stringBuilder);
        return stringBuilder.toString();
    }
}
